-- GENERATED SPELL FOR [Rift Lord] --


function spell0_17839(pUnit, Event) --@Frenzy,Self--
pUnit:FullCastSpellOnTarget(8269,pUnit)
pUnit:RegisterEvent('Sorts_17839', 550, 1)
end

function spell1_17839(pUnit, Event) --@Hamstring,n/a--
pUnit:FullCastSpellOnTarget(9080,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17839', 10322, 1)
end

function spell2_17839(pUnit, Event) --@Knockdown,n/a--
pUnit:FullCastSpellOnTarget(11428,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17839', 2312, 1)
end

function spell3_17839(pUnit, Event) --@Mortal Strike,n/a--
pUnit:FullCastSpellOnTarget(15708,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17839', 5341, 1)
end

function spell4_17839(pUnit, Event) --@Mortal Strike,n/a--
pUnit:FullCastSpellOnTarget(35054,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17839', 5286, 1)
end

function Sorts_17839(pUnit, Event)
local choix_sorts_17839 = math.random(0, 4)
if choix_sorts_17839 == 0 then
pUnit:RegisterEvent('spell0_17839', 1, 1)
end
if choix_sorts_17839 == 1 then
pUnit:RegisterEvent('spell1_17839', 1, 1)
end
if choix_sorts_17839 == 2 then
pUnit:RegisterEvent('spell2_17839', 1, 1)
end
if choix_sorts_17839 == 3 then
pUnit:RegisterEvent('spell3_17839', 1, 1)
end
if choix_sorts_17839 == 4 then
pUnit:RegisterEvent('spell4_17839', 1, 1)
end
end

function mob17839_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17839', math.random(1500, 3000), 1)
end

function mob17839_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17839_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17839_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17839, 1, 'mob17839_Action')
RegisterUnitEvent(17839, 2, 'mob17839_Leave')
RegisterUnitEvent(17839, 3, 'mob17839_Kill')
RegisterUnitEvent(17839, 4, 'mob17839_Die')
